import {Component, Input} from '@angular/core';
import {ObjectUtil} from '../../../utils/object-util';
import {DhlCommonInputComponent} from '../dhlCommonInput';

@Component({
  selector: 'dhl-input',
  templateUrl: './dhl-input.component.html'
})
export class DhlInputComponent extends DhlCommonInputComponent {

  inputplaceholder = '';


  @Input() type;

  @Input() set isArray(value) {
    if (value) {
      $('[dhl-input-element]', this.inputControl.nativeElement).attr('isArray', 'true');
    }
  };

  @Input('placeholder') set placeholder(value: string) {
    this.inputplaceholder = ObjectUtil.isUndefined(value) ? '' : value;
  }


  change() {
    this.valueChange.emit(this.inputValue);
  }


}

